/**
 * 将该button的点击事件设为提交该表单,并设置表单的action
 */

function submitFormByButton(buttonId,formId,action){
	$("#"+buttonId).click(function(){
		var form = $("#"+formId);
		var start = $("#LAY_demorange_s"),end = $("#LAY_demorange_e");
		var startTime = start.val() == ""?start.attr("placeholder"):start.val();
		var endTime = end.val() == ""?end.attr("placeholder"):end.val();
		form.attr("action",action+"?"+"startTime="+startTime+"&"+"endTime="+endTime);
		form.submit();
	} );
}